//
//  RecommendModel.m
//  WuLi
//
//  Created by Gollum on 16/09/01
//  Copyright (c) Gollum. All rights reserved.
//

#import "RecommendModel.h"
#import "RecData.h"

@implementation RecommendModel

+ (NSDictionary *)objectClassInArray{
    return @{@"data" : [RecData class]};
}

- (void)setValue:(id)value forKey:(NSString *)key{

    [super setValue:value forKey:key];
    NSMutableArray *myData = [NSMutableArray array];
    if ([key isEqualToString:@"data"]) {
        NSArray *valueArray = value;
        for (NSDictionary * dataDic in valueArray) {
            RecData *recData = [RecData modelWithDic:dataDic];
            [myData addObject:recData];
        }
        _data = myData;
    }
}



@end
